package com.erp.commands
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.erp.business.login.LoginDelegate;
	import com.erp.control.BaseEvent;
	import com.erp.model.login.LoginModelLocator;

	import flash.events.Event;

	import mx.controls.Alert;
	import mx.rpc.IResponder;
	import mx.rpc.remoting.RemoteObject;

	public class BaseCommand implements ICommand, IResponder
	{
		public function BaseCommand()
		{
		}

		public function execute(event:CairngormEvent):void
		{
			var delegate:LoginDelegate=new LoginDelegate(this);
			delegate.isLogin();
		}

		public function result(data:Object):void
		{
			var loginFlg:String=data.result as String;
			Alert.show(loginFlg);
			//LoginModelLocator.getInstance().logout(data.result as Boolean);
		}

		public function fault(info:Object):void
		{
			Alert.show("login error");
		}
	}
}